package com.venus.component.page;

import java.util.List;


public class PageInfo
{

    private int allRecord;
    private int allPage;
    private int curPage;
    private int nextPage;
    private int previousPage;
    private int pageRecord;
    private List lstRecords;

    public PageInfo(int allRecord, int curPage, int pageRecord){
    	this.pageRecord = pageRecord;
    	this.allPage = ((allRecord + pageRecord) - 1) / pageRecord;
        this.allRecord = allRecord;
        this.curPage = curPage;
        if(allRecord == 0){
            this.curPage = 0;
        }
    }

    public int getAllPage(){
        return this.allPage;
    }

    public void setAllPage(int allPage){
        this.allPage = allPage;
    }

    public int getAllRecord(){
        return this.allRecord;
    }

    public int getPageRecord(){
        return this.pageRecord;
    }

    public void setPageRecord(int pageRecord){
        this.pageRecord = pageRecord;
    }

    public void setAllRecord(int allRecord){
        this.allRecord = allRecord;
    }

    public int getCurPage(){
        return this.curPage;
    }

    public void setCurPage(int curPage){
        this.curPage = curPage;
    }

    public int getNextPage(){
    	this.nextPage = this.curPage + 1;
        return this.nextPage;
    }

    public void setNextPage(int nextPage){
        this.nextPage = nextPage;
    }

    public int getPreviousPage(){
    	this.previousPage = this.curPage - 1;
        return this.previousPage;
    }

    public void setPreviousPage(int previousPage){
        this.previousPage = previousPage;
    }

	public List getLstRecords() {
		return this.lstRecords;
	}

	public void setLstRecords(List lstRecords) {
		this.lstRecords = lstRecords;
	}
    
}
